// store/user.js or wherever your Pinia store is defined
import { defineStore } from 'pinia';

export const useUserStore = defineStore('user', {
  state: () => ({
    userInfo: {
      username: '',
      password: '',
      remember: false,
      autoLogin: false
    },
  }),
  actions: {
    // 定义 setUserInfo 方法
    setUserInfo(info) {
      this.userInfo = { ...this.userInfo, ...info };
    }
  },
});
